package cn.tedu.ivos.base.utils;
import org.springframework.util.DigestUtils;

import java.nio.charset.StandardCharsets;
import java.util.Arrays;
public class KeyGenerator {
   public static String generateKey(String className,
                                    String methodName,
                                    String ...params){
       String keyString=className+":"+methodName+":"+ Arrays.toString(params);
       return DigestUtils.md5DigestAsHex(keyString.getBytes(StandardCharsets.UTF_8));
   }
}
